package com.solution.model;

import static javax.persistence.GenerationType.SEQUENCE;

import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 * QuestionType
 */
@Entity
@Table(name="Question_Type"
    ,schema="public"
)
public class QuestionType extends AbstractPO
 {

	
	private static final long serialVersionUID = 1L;
	
    private Long id;
    private ImageType imageType;
    private LevelType levelType;
    private CategoryType categoryType;
    private String questionStatement;
    private Integer correctOptionsCount;
    private Short status;
    private String statusReason;
    private ClientType clientType;
    private String createdBy;
    private Date createdOn;
    private String modifiedBy;
    private Date modifiedOn;
    private String rfu1;
    private String rfu2;
    private String rfu3;
 
    @SequenceGenerator(name="generator", sequenceName="question_type_seq")@Id @GeneratedValue(strategy=SEQUENCE, generator="generator")
    
    
    @Column(name="Question_TypeID", unique=true, nullable=false, precision=10, scale=0)
    public Long getId() {
        return this.id;
    }
    
    public void setId(Long id) {
        this.id = id;
    }
    @ManyToOne(fetch=FetchType.EAGER, cascade=CascadeType.ALL)
    @JoinColumn(name="Image_TypeID")
    public ImageType getImageType() {
        return this.imageType;
    }
    
    public void setImageType(ImageType imageType) {
        this.imageType = imageType;
    }
    @ManyToOne(fetch=FetchType.EAGER)
    @JoinColumn(name="Level_TypeID")
    public LevelType getLevelType() {
        return this.levelType;
    }
    
    public void setLevelType(LevelType levelType) {
        this.levelType = levelType;
    }
    @ManyToOne(fetch=FetchType.EAGER)
    @JoinColumn(name="Category_TypeID")
    public CategoryType getCategoryType() {
        return this.categoryType;
    }
    
    public void setCategoryType(CategoryType categoryType) {
        this.categoryType = categoryType;
    }
    
    @Column(name="Question_Statement", nullable=false, length=4000)
    public String getQuestionStatement() {
        return this.questionStatement;
    }
    
    public void setQuestionStatement(String questionStatement) {
        this.questionStatement = questionStatement;
    }
    
    @Column(name="correct_Options_Count", precision=4, scale=0, nullable=false)
    public Integer getCorrectOptionsCount() {
		return correctOptionsCount;
	}

	public void setCorrectOptionsCount(Integer correctOptionsCount) {
		this.correctOptionsCount = correctOptionsCount;
	}
    
    @Column(name="Status", nullable=false, precision=4, scale=0)
    public Short getStatus() {
        return this.status;
    }
    
    public void setStatus(Short status) {
        this.status = status;
    }
    
    @Column(name="Status_Reason", length=2000)
    public String getStatusReason() {
        return this.statusReason;
    }
    
    public void setStatusReason(String statusReason) {
        this.statusReason = statusReason;
    }
    
    @ManyToOne(fetch=FetchType.EAGER, cascade=CascadeType.REFRESH)
    @JoinColumn(name="Client_TypeID")
    public ClientType getClientType() {
        return this.clientType;
    }
    
    public void setClientType(ClientType clientType) {
        this.clientType = clientType;
    }
    
    @Column(name="CreatedBy", nullable=false, length=50)
    public String getCreatedBy() {
        return this.createdBy;
    }
    
    public void setCreatedBy(String createdBy) {
        this.createdBy = createdBy;
    }
    
    @Column(name="CreatedOn", nullable=false, length=23)
    public Date getCreatedOn() {
        return this.createdOn;
    }
    
    public void setCreatedOn(Date createdOn) {
        this.createdOn = createdOn;
    }
    
    @Column(name="ModifiedBy", length=50)
    public String getModifiedBy() {
        return this.modifiedBy;
    }
    
    public void setModifiedBy(String modifiedBy) {
        this.modifiedBy = modifiedBy;
    }
    
    @Column(name="ModifiedOn", length=23)
    public Date getModifiedOn() {
        return this.modifiedOn;
    }
    
    public void setModifiedOn(Date modifiedOn) {
        this.modifiedOn = modifiedOn;
    }
    
    @Column(name="RFU1", length=100)
    public String getRfu1() {
        return this.rfu1;
    }
    
    public void setRfu1(String rfu1) {
        this.rfu1 = rfu1;
    }
    
    @Column(name="RFU2", length=100)
    public String getRfu2() {
        return this.rfu2;
    }
    
    public void setRfu2(String rfu2) {
        this.rfu2 = rfu2;
    }
    
    @Column(name="RFU3", length=100)
    public String getRfu3() {
        return this.rfu3;
    }
    
    public void setRfu3(String rfu3) {
        this.rfu3 = rfu3;
    }
	
}


